@import "./variables.scss";
.d-flex {
  display: -webkit-box;
  display: -webkit-flex;
  display: -moz-box;
  display: -ms-flexbox;
  display: flex;
  .flex__item {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
  }
  @at-root .f-align {
    -webkit-box-align: center;
    -webkit-align-items: center;
    -moz-box-align: center;
    -ms-flex-align: center;
    align-items: center;
  }
  @at-root .f-around {
    -webkit-justify-content: space-around;
    -ms-flex-pack: distribute;
    justify-content: space-around;
  }
  @at-root .f-between {
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -moz-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
  }
  @at-root .f-center {
    justify-content: center;
  }
}

.bg-white {
  background-color: $white;
}

.float-r {
  float: right;
}

.float-l {
  float: left;
}

.vertical-m {
  vertical-align: middle;
  display: inline-block;
}

@each $i in 0 5 10 15 20 25 30 35 40 45 50 {
  $var: $i + px;
  .mt-#{$i} {
    margin-top: $var;
  }

  .mb-#{$i} {
    margin-bottom: $var;
  }

  .ml-#{$i} {
    margin-left: $var;
  }

  .mr-#{$i} {
    margin-right: $var;
  }
  .mg-#{$i} {
    margin: $var;
  }

  .pd-#{$i} {
    padding: $var;
  }

  .pt-#{$i} {
    padding-top: $var;
  }

  .pb-#{$i} {
    padding-bottom: $var;
  }

  .pl-#{$i} {
    padding-left: $var;
  }

  .pr-#{$i} {
    padding-right: $var;
  }

  .pd-#{$i} {
    padding: $var;
  }
}

.pointer {
  cursor: pointer;
}

.tc {
  text-align: center;
}
.tr {
  text-align: right;
}
.tl {
  text-align: left;
}

.fw-b {
  font-weight: bold;
}

.fw-n {
  font-weight: normal;
}

.relative {
  position: relative;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

// 超出隐藏
.text-hidden {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@for $i from 2 through 5 {
  .text-hidden-#{$i} {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: $i;
    overflow: hidden;
  }
}

// 字体大小
@for $i from 10 through 20 {
  .fs-#{$i} {
    font-size: $i + px;
  }
}

.d-inline-block {
  display: inline-block;
}

.d-block {
  display: block;
}
